const webpack = require('webpack')
module.exports = {
    publicPath:'./',
    productionSourceMap: false,
    lintOnSave: false,
    outputDir:'./example-html',
    chainWebpack(config){
        if(process.env.NODE_ENV === 'production'){
            if(process.env.npm_config_report){
                config.plugin('webpack-bundle-analyzer').use(
                    require('webpack-bundle-analyzer').BundleAnalyzerPlugin
                ).end();
            }
        }
    },
    configureWebpack:{
        plugins:[
            new webpack.optimize.MinChunkSizePlugin({
                minChunkSize:100000
            })
        ]
    },
    devServer:{
        // host:'d-zhongjunweb.bigchun.com',
        // port:8082,
        proxy:{
            'example-api':{
                target:'http://d-zhongjunweb.bigchun.com',
                changeOrigin: true,
                secure:false,
                // pathRewrite: {
                //     "/example-api": "/"
                // }
            },
            

        }
    }
}